#pragma once
#ifndef MDOPT_H
#define MDOPT_H

#include <vector>
#include "OptData.h"
#include "Constraint.h"
#include <iostream>
#include "math.h"
#include "StopCriteria.h"

using namespace std;

class MDopt
{
public:
	MDopt(void);
	~MDopt(void);

	void optimization(vector<double> *resutlWeight,OptData* optData, vector<SConstraint> *pConstrain, vector<double> *objFunValue,int maxIter=100);

	int n;			//total beamlet number
	int maxits;		//maximum iteration
	double dampLambda;						
	double deltaT;

	double Force;
	double Temp;		//Temperature
	double Objective;
	
	vector<double> f1;	//force
	vector<double> f2;
	vector<double> v1;	//velocity
	vector<double> v2;
	vector<double> mass;	//mass each beamlet
	vector<double> x1;	//position
	vector<double> x2;
	vector<double> exf;	//external force each beamlet

};

#endif